{% extends "base.html" %}
{% block title_descn %}最新图片{% endblock %}



{% block middle %}
<div class="row-fluid">
    <div id="content" class="span11 offset1">

        <div >
        <h3><span class="badge badge-info"> 最新图片 </span></h3>
        </div>

<br/>
	<ul class=thumbnails >

      {% for o in object_list %}
    	<li class="thumbnail" >
               <div>
                   <div>标题： <span>{{o.title}}</span></div>
    	    <a href="/photos/{{o.id}}/">
    	    <img class="img-polaroid"  src="{{o.get_photo_url}}" style="width:140px;height:140px" >
            </a>

               <div>
               <a>浏览({{o.view_count}})</a> | <a>回复({{o.rep_count}})</a>
               </div>
                   </div>
    	</li>
    {% endfor %}    
	</ul>

    </div>

</div>


<div class="row-fluid">
<div class="span4 offset4">
	<div id="pagination"class="text-center">
        <form method="get" name="pform" action="">
		<a>{{page}}/{{pages}} 页</a>

        <div class="input-append">
		<input name="page" size="4" maxlength="255" value="1" id="pg" type="text">
		<button class="btn" onclick="document.pform.submit(); return false;">GO</button>
	</div>


	<div id="pagination">
		{% if has_previous %}
			<a href="/allnewphotos/?page=1">首页</a>
			<a href="/allnewphotos/?page={{ previous }}">上一页</a>
		{% endif %} {% if has_next %}
			<a href="/allnewphotos/?page={{ next }}">下一页</a>
			<a href="/allnewphotos/?page={{pages}}">尾页</a>	
		{% endif %}
	</div>	

    </form>

</div>
</div>
    </div>
{% endblock %}
